/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wuqingyu
 * Date: 2022-07-26
 * Time: 11:15
 */

/**
 * 输出不同类型的最小取值范围和最大取值范围
 * 会用到包装类（此类型的plus版本）
 */
public class TestDemo {
    public static void main(String[] args) {
        /*int a = 10;
        //方法一：后面+一个空字符串
        String s = a+" ";//整型+字符串类型=字符串类型
        System.out.println(s);
        //方法二：借助方法
        String str3 = String.valueOf(a);
        String str2 =String.valueOf(10);
        System.out.println(str3);
        System.out.println(str2);*/

        String str = "10";
        int t = Integer.parseInt(str);
        System.out.println(t+1);
        int t2 = Integer.valueOf(str);
        System.out.println(t2+2);


    }
    public static void main7(String[] args) {
        int a = 5;
        int b = 20;
        String s = "YES,";
        String s2 = "hahaha";
        System.out.println("today is "+a+b);
        System.out.println(s+s2);
        System.out.println(a+b+" is today");



    }


    public static void main6(String[] args) {
       /* boolean flag = true;
        int a = 1;
        flag = (boolean)a; //error*/
    }

    public static void main5(String[] args) {
        char ch1 ='h';
        System.out.println(ch1);
        char ch2 ='1';
        System.out.println(ch2);
        char ch3 ='呵';
        System.out.println(ch3);
        char ch4 = 97;
        System.out.println(ch4);
    }


    public static void main3(String[] args) {
        float b = (float)3.14;
        System.out.println(b);
    }


    public static void main1(String[] args) {
        //byte ->Byte
        System.out.println(Byte.MIN_VALUE );
        System.out.println(Byte.MAX_VALUE);
        //short ->Short
        System.out.println(Short.MIN_VALUE );
        System.out.println(Short.MAX_VALUE);
        //int ->Integer
        System.out.println(Integer.MIN_VALUE );
        System.out.println(Integer.MAX_VALUE);
        //long ->Long
        System.out.println(Long.MIN_VALUE );
        System.out.println(Long.MAX_VALUE);
        //char ->Character
        System.out.println(Character.MIN_VALUE );
        System.out.println(Character.MAX_VALUE);

    }

}
